package com.ezmobo.dao.AdminUser;

import java.util.List;

import org.mybatis.spring.support.SqlSessionDaoSupport;

//public class AdminDao extends DynamicSqlSessionDaoSupport implements AdminUserMapper {
public class AdminDao extends SqlSessionDaoSupport implements AdminUserMapper {

	@Override
	public List<AdminUserDO> getAdminUsers() {
		return this.getSqlSession().selectList("com.ezmobo.dao.AdminUser.getAdminUsers");
	}

	@Override
	public int addAdminUser(AdminUserDO user) {
		return this.getSqlSession().insert("com.ezmobo.dao.AdminUser.addAdminUser", user);
	}

	@Override
	public int deleteUser(String userId) {
		return this.getSqlSession().delete("com.ezmobo.dao.AdminUser.deleteUser", userId);
	}

	@Override
	public int updateUser(AdminUserDO user) {
		return this.getSqlSession().update("com.ezmobo.dao.AdminUser.updateUser", user);
	}

}
